package com.lu.test.aop;

import org.springframework.aop.framework.AopContext;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Conditional;
import org.springframework.stereotype.Service;

public class StudentService implements IStudentService{
	@Autowired
	private Service1 service1;

	public Student addStudent() {
		System.out.println("=========================添加学生======================");
		Student student = new Student();
		student.setId(1L);
		// 获取当前代理对象
		//AopContext.currentProxy();
		student.setName("helloworld");
		//try {
			int a = 0;
			int i = 1 / a;
		//}catch (Exception e){

		//}
		return student;
	}
}
@Service
class Service1 {

}
